/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.app.user.agreement;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.jeesite.common.config.Global;
import com.jeesite.common.entity.Page;
import com.jeesite.common.mapper.JsonMapper;
import com.jeesite.common.web.BaseController;
import com.jeesite.modules.conf.AppController;
import com.jeesite.modules.conf.MessageCode;
import com.jeesite.modules.zx.user.agreement.entity.TuserAgreement;
import com.jeesite.modules.zx.user.agreement.service.TuserAgreementService;

/**
 * 用户协议条款Controller
 * @author zpp
 * @version 2020-02-27
 */
@Controller
@RequestMapping(value = "/app/user/agreement/")
public class AppUserAgreementController{

	@Autowired
	private TuserAgreementService tuserAgreementService;
	
	
	
	@RequestMapping(value = "listData")
	public void listData(TuserAgreement tuserAgreement, HttpServletRequest request, HttpServletResponse response) {
		List<TuserAgreement> findList = tuserAgreementService.findList(tuserAgreement);
		JSONArray parseArray = JSONObject.parseArray(JsonMapper.toJson(findList));
		AppController.renderSuccessObject(response, parseArray, MessageCode.SUCCESS_ACK);
	}

	
}